﻿using Castle.DynamicProxy;
using Puppy.DynamicProxy;

namespace Puppy.Autofac.DynamicProxy
{
    /// <summary>
    /// 拦截方法调用并确定是否是异步方法。
    /// </summary>
    /// <typeparam name="TInterceptor"></typeparam>
    public class AsyncDeterminationInterceptor<TInterceptor> : AsyncDeterminationInterceptor
        where TInterceptor : IPuppyInterceptor
    {
        public AsyncDeterminationInterceptor(TInterceptor interceptor)
            : base(new CastleAsyncInterceptorAdapter<TInterceptor>(interceptor))
        {

        }
    }
}